<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h1>用户登录</h1>
<form method="post" action="/login/">

    {% csrf_token %}<!--安全机制的校验 随机字符串 确保是网页发过来的请求-->

    <input type="text" name="user" placeholder="用户名">
    <input type="password" name="pwd" placeholder="密码">
    <input type="submit" value="提交">
    <span style="color: red;">{{ error }}</span>
</form>

</body>
</html>